package com.soecode.lyf.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.soecode.lyf.controller.base.BaseController;
import com.soecode.lyf.entity.User;
import com.soecode.lyf.service.IUserService;
import com.soecode.lyf.tool.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController extends BaseController {


    @Autowired
    IUserService iUserService;

    @GetMapping("/get-all-user")
    public AjaxResult test() {
        IPage<User> iPage = new Page<User>(1,1);
        IPage<User> page =  iUserService.page( iPage,null);
        return success(page);
    }
}
